import { observable, computed } from 'mobx';
import { TYPE_KEY, LOGIN_KEY } from '../service/Config';

export class CurrUserModel {

    @observable login: string;
    @observable superAdmin: boolean;

    constructor() {
        this.login = localStorage.getItem(LOGIN_KEY);
        this.superAdmin = JSON.parse(localStorage.getItem(TYPE_KEY) || 'false');
    }
}

export const currUser = new CurrUserModel();